package com.guotai.meet.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.guotai.meet.dao.UserSystemDao;
import com.guotai.meet.entity.UserSystem;

@Service
public class UserSystemService {

	 @Resource
	 private  UserSystemDao userSystemDao;
	 
	 /**
	  * 登录查询
	  * @param userName
	  * @return
	  */
	 public UserSystem selectByUserName(String userName){
		 return userSystemDao.selectByUserName(userName);
	 }
	 
	 /**
	  * 根据实体查询
	  * @param user
	  * @return
	  * @author Information
	  */
	 public UserSystem queryByEntity(UserSystem user) {
		 return userSystemDao.queryByEntity(user);
	 }
	 
	 /**
	  * 
	  * @param user
	  * @return
	  * @author Information
	  */
	 public List<UserSystem> queryUserList(UserSystem user) {
		 return userSystemDao.queryUserList(user);
	 }
	 
	 /**
	  * 
	  * @param search
	  * @param company 
	  * @return
	  */
	 public List<UserSystem> findUserList(String search,String company,int pageIndex,int pageSize) {
		 return userSystemDao.findUserList(search, company, pageIndex, pageSize);
	 }
	 
	 /**
	  * 根据ID删除用户信息
	  * @param userId
	  * @return
	  * @author Information
	  */
	 public int deleteByPrimaryKey(String userId) {
		 return userSystemDao.deleteByPrimaryKey(userId);
	 }
	 
	 /**
	  * 根据主键id查询对象
	  * @param userId
	  * @return
	  * @author Information
	  */
	 public UserSystem selectByPrimaryKey(String userId){
		 return userSystemDao.selectByPrimaryKey(userId);
	 };
	 
	 /**
	  * 新增信息
	  * @param user
	  * @return
	  * @author Information
	  */
	 public int insertSelective(UserSystem user){
		 return userSystemDao.insertSelective(user);
	 };
	 
	 /**
	  * 新增信息
	  * @param user
	  * @return
	  * @author Information
	  */
	 public int updateByPrimaryKeySelective(UserSystem user){
		 return userSystemDao.updateByPrimaryKeySelective(user);
	 };
	 
	 /**
	  * 新增信息
	  * @param user
	  * @return
	  * @author Information
	  */
	 public int findByUserName(UserSystem user){
		 return userSystemDao.updateByPrimaryKeySelective(user);
	 };
 
}
